import LayoutBase from '@/layouts/LayoutBase';

export default [
  {
    path: '/purchase',
    component: LayoutBase,
    meta: {
      title: '天章集团采购',
      isLogin: true,
    },
    children: [
      {
        path: '/purchase',
        component: () => import(/* webpackChunkName: "purchase" */'@/pages/purchase/index'),
        children: [
          {
            path: 'offline',
            component: () => import(/* webpackChunkName: "purchase" */'@/pages/purchase/offline/index'),
            meta: {
              title: '采购',
            },
          },
          {
            path: 'online',
            component: () => import(/* webpackChunkName: "purchase" */'@/pages/purchase/online/index'),
            meta: {
              title: '采购',
            },
          },
        ],
      },

      {
        path: '/purchase/offline/create',
        component: () => import(/* webpackChunkName: "purchase" */'@/pages/purchase/offline/form'),
        meta: {
          title: '添加线下采购单',
          isAdd: true,
        },
      },
      {
        path: '/purchase/offline/edit/:id',
        component: () => import(/* webpackChunkName: "purchase" */'@/pages/purchase/offline/form'),
        meta: {
          title: '编辑线下采购单',
          isEdit: true,
        },
      },
      {
        path: '/purchase/offline/detail/:id',
        component: () => import('@/pages/purchase/offline/detail'),
        meta: {
          title: '线下采购单详情',
        },
      },
      {
        path: '/purchase/online/detail/:id',
        component: () => import('@/pages/purchase/online/detail'),
        meta: {
          title: '线上采购单详情',
        },
      },
    ],
  },

];
